﻿using System.Windows;
using SGTv2.ViewModel;
using Fluent;
using Stema.Controls;
using System.Windows.Media.Imaging;
using System;

namespace SGTv2
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : RibbonWindow
    {
        public MainWindow()
        {
            InitializeComponent();
            DataContext = new MainViewModel();
            Closing += (s, e) => ViewModelLocator.Cleanup();
          
        }

        public bool NavigatioPaneOff
        {
            get { return navigationPane.Visibility == System.Windows.Visibility.Collapsed; }
            set
            {
                navigationPane.Visibility = value ? System.Windows.Visibility.Collapsed : System.Windows.Visibility.Visible;
            }
        }
        public bool ExpanderPaneOff
        {
            get { return navigationPaneExpander.Visibility == System.Windows.Visibility.Collapsed; }
            set
            {
                navigationPaneExpander.Visibility = value ? System.Windows.Visibility.Collapsed : System.Windows.Visibility.Visible;
            }
        }

        private void navigationPaneExpander_CloseButtonClick(object sender, RoutedEventArgs e)
        {

        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            NavigationPaneItem item = new NavigationPaneItem();
            item.Header = "Hola";
            item.Content = "contenido";
            item.Image = new BitmapImage(new Uri(@"pack://application:,,,/SGT;component/Img/folderopen.ico"));

            navigationPane.Items.Add(item);
        }
    }
}
